# import liveschema as ls
from livscm import types as lst

#MAX_STATE = lst.Int32(12, const = True, comment = '''Maximum global state number
#It can be very large''')
MAX_TEXTURE = lst.Int32(8, const = True, comment = 'Maximum Texture Number')

EStateType = lst.Enum(
	__comment__ 	= 'Global State Type Enummeration',
	STATE_DEFAULT 	= lst.EnumItem(comment = 'Default State'),
	STATE_ALPHA 	= lst.EnumItem(value = 3, comment = 'Alpha Transparency State'),
	STATE_WIREFRAME	= lst.EnumItem(comment = '''Wireframe Draw Mode
(Debug Mode Only)'''),
)

class Vector3(lst.Object):
	__comment__ = 'Vector Class With Float Type Three Elements'
	data = lst.Array(lst.Float, 3)

class Matrix4(lst.Object):
	data = lst.Array(lst.Float, 16)
	
class Object(lst.SharedObject):
	pass

class Bound(Object):
	pass

class GlobalState(Object):
	pass

DefaultBound = Bound()

class Spatial(Object):
	ECullType = lst.Enum(
		CULL_DYNAMIC 	= lst.EnumItem(comment = 'Cull Dynamically'),
		CULL_ALWAYS 	= lst.EnumItem(comment = '''Cull Always
Only used in FX or UI'''),
		CULL_NEVER 		= lst.EnumItem(value = 100, comment = 'Cull Never'),
	)
	MAX_STATE 	= lst.Int32(12, static = True, const = True, comment = 'Max count of state')
	bound 		= lst.SharedPointer(Bound, value = lst.AddressOf(DefaultBound))
	local_tm 	= Matrix4()
	world_tm 	= Matrix4()
	is_current 	= lst.Bool(comment = '''World TM is current
( Not update TM )''')

